package com.sjk.flink.analysis;

import com.fasterxml.jackson.databind.JsonNode;

/**
 * @author SAMA
 */
public class TestAnalysisHander implements IAnalysisHander{

    @Override
    public Object doAnalysis(JsonNode recordNode) {
        if(recordNode==null){
            return null;
        }
        JsonNode xx1JsonNode = recordNode.get("xx1");
        JsonNode xx2JsonNode = recordNode.get("xx2");
        StringBuffer br = new StringBuffer();
        if(xx1JsonNode!=null){
            br.append(xx1JsonNode.asText());
        }
        br.append("_");
        if(xx2JsonNode!=null){
            br.append(xx2JsonNode.asText());
        }
        return br.toString();
    }

}
